<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>长度的操作</title>
</head>
<body>
    <script>
        //准备一个数组
        var arr=[100,200,300,400]
        //输出一下
        console.log(arr)
        //获取数组的长度
        console.log(arr.length)

        //修改一下数组的长度
        arr.length=3
        //输出数组
        console.log(arr)
        //输出数组的长度
        console.log(arr.length)
    </script>
</body>
</html>